/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.live.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 直播表
 * </p>
 *
 * @author xiaoq
 * @since 2019-11-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_live")
@ApiModel(value = "live对象", description = "直播间信息表")
public class Live<T extends Model<?>> extends Model<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "直播表id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "租户id")
    @TableField("tenant_id")
    private String tenantId;

    @ApiModelProperty(value = "商铺id")
    @TableField("shop_id")
    private String shopId;

    @ApiModelProperty(value = "直播房间号")
    @TableField("room_id")
    private String roomId;

    @ApiModelProperty(value = "直播名称")
    @TableField("live_name")
    private String liveName;

    @ApiModelProperty(value = "开播时间")
    @TableField("start_time")
    private Date startTime;

    @ApiModelProperty(value = "停播时间")
    @TableField("end_time")
    private Date endTime;

    @ApiModelProperty(value = "主播信息")
    @TableField("anchor")
    private String anchor;

    @ApiModelProperty(value = "观看量")
    @TableField("view_count")
    private Long viewCount;

    @ApiModelProperty(value = "点赞量")
    @TableField("like_count")
    private Long likeCount;

    @ApiModelProperty(value = "状态(默认未开始，101--直播中，102--未开始，103--已结束，104--禁播，105--暂停中，106--异常，107--已过期)")
    @TableField("status")
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)

    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)


    private LocalDateTime updateTime;
    @TableLogic
    @ApiModelProperty("删除状态：0->未删除；1->已删除")
    @TableField(value = "is_deleted", fill = FieldFill.INSERT)
    private Boolean deleted;

    @ApiModelProperty(value = "背景封面图")
    @TableField("cover_img")
    private String coverImg;

    @ApiModelProperty(value = "主播头像图")
    @TableField("anchor_img")
    private String anchorImg;

    @ApiModelProperty(value = "分享卡片封面图")
    @TableField("share_img")
    private String shareImg;


    @ApiModelProperty(value = "首页排序")
    @TableField("sort")
    private Long sort;

    @ApiModelProperty(value = "是否首页 0否 1是")
    @TableField("first_flag")
    private Integer firstFlag;

}
